getBoxCollider = () => {
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
        if (d.BoxCollider.Add) {
            var nodeId = d.ID;
            prefabIndex++;
            global.curID++;
            global.finialInfo.push(BoxCollider(nodeId,d.BoxCollider));
        }
    }
}
BoxCollider = (nodeId,data) => {
    var d = {
        "__type__": "cc.PhysicsBoxCollider",
        "_name": "",
        "_objFlags": 0,
        "node": {
          "__id__": nodeId
        },
        "_enabled": true,
        "tag": data.Tag,
        "_density": 1,
        "_sensor": false,
        "_friction":data.Friction,
        "_restitution": 0,
        "body": null,
        "_offset": {
          "__type__": "cc.Vec2",
          "x":  Number(data.Offset.x.toFixed(2)),
          "y": Number(data.Offset.y.toFixed(2))
        },
        "_size": {
          "__type__": "cc.Size",
          "width": Number(data.Size.x.toFixed(2)),
          "height": Number(data.Size.y.toFixed(2))
        },
        "_id": ""
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
    getBoxCollider,
};